package com.taobao.daxue.ui
{
	import com.taobao.daxue.controller.MicrophoneRecorder;
	import flash.events.MouseEvent;
	import org.aswing.JButton;
	import org.aswing.JPanel;
	import org.aswing.LayoutManager;
	import org.aswing.SoftBoxLayout;
	
	public class MakerControlPanel extends JPanel
	{
		
		private var m_btnAddNote:JButton;
		private var m_btnRecord:JButton;
		private var m_btnSave:JButton;
		private var m_btnReset:JButton;
		
		private var m_recorder:MicrophoneRecorder;
		
		public function MakerControlPanel(layout:LayoutManager=null, recorder:MicrophoneRecorder)
		{
			super(layout);
			createUI();
		}
		
		private function createUI():void {
			
			// set layout
			setLayout(new SoftBoxLayout(SoftBoxLayout.X_AXIS, 2, SoftBoxLayout.LEFT);
			
			// add child button
			m_btnAddNote = new JButton("添加备注");
			m_btnAddNote.addEventListener(MouseEvent.CLICK, onBtnAddNoteClick);
			this.append(m_btnAddNote);
			
			m_btnRecord = new JButton("开始记录");
			m_btnRecord.addEventListener(MouseEvent.CLICK, onBtnRecordClick);
			this.append(m_btnRecord);
			
			m_btnSave = new JButton("保存章节");
			m_btnSave.addEventListener(MouseEvent.CLICK, onBtnSaveClick);
			this.append(m_btnSave);
			
			m_btnReset = new JButton("重置章节");
			m_btnReset.addEventListener(MouseEvent.CLICK, onBtnResetClick);
			this.append(m_btnReset);
			
		}
		
		private function onBtnAddNoteClick(e:MouseEvent):void {
			
		}
		
		private function onBtnRecordClick(e:MouseEvent):void {
			
		}
		
		private function onBtnSaveClick(e:MouseEvent):void {
			
		}
		
		private function onBtnResetClick(e:MouseEvent):void {
			
		}
		
	}
}